package top.dbpanda.cmsjpa.learn.juc;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class MyThread implements Runnable {
    private String threadName;

    @Override
    public void run() {
        try {
            System.out.println("threadName:" + this.threadName);
            System.out.println(threadName + "执行了1秒");
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
